<template>
	<section class="scholl" >
		<div>
			<ul>
				<li>					
					<div class="size_list pt30rem pb30rem pl30rem pr30rem border-b">
						<span class="fs30rem c333 item-name">原密码：</span>
						<input type="password" placeholder="请填写原密码" v-model="form.old_password">	
					</div>					
				</li>
				<li>					
					<div class="size_list pt30rem pb30rem pl30rem pr30rem border-b">
						<span class="fs30rem c333 item-name">新密码：</span>
						<input type="password" placeholder="请填写新密码"  v-model="form.new_password">
					</div>					
				</li>
				<li>					
					<div class="size_list pt30rem pb30rem pl30rem pr30rem border-b">
						<span class="fs30rem c333 item-name">确认密码：</span>
						<input type="password" placeholder="请再次填写新密码" v-model="form.confirm_newpwd">
					</div>					
				</li>
			</ul>
			<button class="change-pw-btn white fs32rem pt20rem pb20rem w92" @click="submit">确认</button>
		</div>
	</section>
</template>

<script>
	// import { modifyUserpwd } from "@/api/member";
	import $toast   from '@/utils/toast';

	export default{
		data()
		{
			return{
				form: {
					uid: localStorage.getItem('uid'),
					old_password: '',
					new_password: '',
					confirm_newpwd: ''
				}	
			}
		},
		methods:{
			submit()
			{
				modifyUserpwd(this.form).then( (res) => {
					 $toast('修改密码成功');
				});
			}
		}
	}
</script>
<style lang="less">
::-webkit-input-placeholder{
	color: #adadad;
		font-size: 28/28rem;
}    
:-moz-placeholder{
	color: #adadad;
		font-size: 28/28rem;
}                  
::-moz-placeholder{
	color: #adadad;
		font-size: 28/28rem;
}                 
:-ms-input-placeholder{
	color: #adadad;
		font-size: 28/28rem;
}  
	
	.item-name{
		display: inline-block;
		width: 180/28rem;
	}
	.change-pw-btn{
		display: block;
		background-color: #ff0036;
		border-radius: 5px;
		position: absolute;
		bottom: 20%;
		left: 50%;
		transform: translate(-50%,50%);
	}
</style>

